<template>
  <f7-page>
    <f7-navbar>
      <div  @click="$f7router.back()">
        <f7-nav-left>
          <f7-icon f7="chevron_left"></f7-icon>
          <span class="Back">返回</span>
        </f7-nav-left>
      </div>

          路线详情
          <f7-nav-right> <f7-button class="btn">修改</f7-button> <f7-button class="btn">分享</f7-button> </f7-nav-right>
    </f7-navbar>



    <f7-list>
      <div class="item-address">
        <img src="../../assets/img/landmark-blue.png" class="landmark">
        <h2>出发地:{{lineInfo.start_province}}</h2>
        <h5><span v-for="(item) in lineInfo.start_city">{{item}}&nbsp;</span></h5>
        <h5><span v-for="(item) in lineInfo.start_district">{{item}}&nbsp;</span></h5>
      </div>
      <div class="item-address">
        <img src="../../assets/img/landmark-1.png" class="landmark">
        <h2>到达地：{{lineInfo.end_province}}</h2>
        <h5><span v-for="(item) in lineInfo.end_city">{{item}}&nbsp;</span></h5>
        <h5><span v-for="(item) in lineInfo.end_district">{{item}}&nbsp;</span></h5>
      </div>
    </f7-list>

    <f7-list form>
      <f7-list-item>
        <div class="item-title label">去程报价(元/吨)</div>
        <span class="text-orange" v-if="lineInfo.money">￥{{lineInfo.money}}</span>
        <span class="text-orange" v-if="!lineInfo.money">以货源方出价为标准</span>
      </f7-list-item>
      <f7-list-item>
        <div class="item-title label">回程报价(元/吨)</div>
        <span class="text-orange" v-if="lineInfo.unmoney">￥{{lineInfo.unmoney}}</span>
        <span class="text-orange" v-if="!lineInfo.unmoney">以货源方出价为标准</span>
      </f7-list-item>
      <f7-list-item>
        <div class="item-title label">运输货物</div>
        <span class="text-orange" v-if="lineInfo.cargo_chn">
          {{lineInfo.cargo_chn.toString()}}
        </span>
      </f7-list-item>
    </f7-list>

<!--    <f7-block>
      <div class="segmented segmented-raised">
        <a class="button tab-link tab-link-active" href="#tab1">货源</a>
        <a class="button tab-link" href="#tab2">车辆</a>
      </div>
    </f7-block>

    <f7-block-title class="nav_title">
      <h5>合作企业匹配</h5>
      <h5>0条相似货源，最高0元/吨</h5>
    </f7-block-title>

    <f7-block-title class="nav_title">
      <h5>平台推荐</h5>
      <h5>0条相似货源，最高0元/吨</h5>
    </f7-block-title>


    <f7-card>
      <f7-card-header>
        <img src='../../assets/img/driver-car.png' class="infor-face">
        <div class="text-center_article"> 皖A88888</div>
        <div class="text-center_weight"> 载重10吨</div>
        <div class="text-right">
          <span>鸡西锰矿</span>
          <img src='../../assets/img/infor-face.png' class="label-v">
        </div>
      </f7-card-header>
      <f7-card-header>
        <div class="text-left">
          <img src='../../assets/img/line-icon.png' class="line-icon">
          <div class="pull-left">
            <b>北京</b>
            <span>丰台</span>
            <span>07-05 周四</span>
          </div>
        </div>
        <div class="text-center">
          <h5 class="text-orange">去：￥77元/吨</h5>
          <h5 class="status-bg text-orange ">回：￥525元/吨</h5>
        </div>
        <div class="text-right">
          <div class="pull-right">
            <b>鸡西</b>
            <span>恒山区</span>
            <span>07-07 周一</span>
          </div>
        </div>
      </f7-card-header>
    </f7-card>-->

  </f7-page>
</template>

<script>
  export default {
    name: 'details',
    data () {
      return {
        lineInfo: ''
      }
    },
    methods: {
      async passListDemand(){
        let param = {line_id: this.$f7Route.params.lineid}
        this.lineInfo = (await this.LineService.lineDetails(param)).data.data.lineInfo
      }
    },
    mounted() {
      this.passListDemand()
    }
  }
</script>

<style scoped>
  .ios .navbar .right {
    margin-left: 10px;
    color: #fff;
    font-size: 14px;
  }

  .ios .navbar a.link {
    color: #fff;
    font-size: 14px;
  }

  .Back {
    color: #fff;
    font-size: 16px;
    margin-left: 4px;
  }

  .btn {
    border: 0 !important;
    color: #fff !important;
    font-size: 14px;
    margin: 0 !important;
    padding: 0px 5px;
    background: none !important;
  }

  .ios .list {
    margin: 35px 0;
    font-size: 17px;
    background: #fff;
  }

  .item-address {
    position: relative;
    border: none;
    padding: 10px 20px 8px 50px;
    min-height: 0;
    border-bottom: 1px solid #f5f5f5;
  }

  .landmark {
    position: absolute;
    border-radius: 0;
    width: 21px;
    height: 30px;
    left: 15px;
    top: 12px;
  }

  .item-address h2 {
    color: #333;
    font-size: 14px;
    margin: 0;
  }

  .item-address h5 {
    color: #666;
    font-size: 12px;
    margin: 5px 0px;
    font-weight: initial;
  }

  .item-address h5 span {
    margin-right: 6px;
  }

  .text-orange {
    color: #ff6c00;
    font-weight: bold;
    font-size: 14px;
  }

  .ios .list {
    margin: 15px 0 !important;
  }

  .ios .button {
    border: 1px solid #fff;
    color: #a2a2f0;
    background: #fff;
  }

  .ios .button.tab-link-active {
    background: #a2a2f0;
    color: #fff;
  }

  .segmented {
    width: 160px;
    margin: 0 auto;
  }

  .ios .block {
    margin: 20px 0;
  }

  .nav_title {
    margin: 10px 0px !important;
    text-align: center;
  }

  .nav_title h5 {
    margin: 0px;
    font-weight: initial;
    color: #666;
  }

  .card {
    background: #fff;
    position: relative;
    font-size: 14px;
  }

  .ios .card-header {
    padding: 10px 15px 7px 15px;
    position: static;
  }

  .infor-face {
    max-width: 38px;
    max-height: 38px;
    width: 100%;
    height: 100%;
  }

  .text-center_article {
    position: absolute;
    font-size: 14px;
    color: #A2A2F0;
    padding-left: 50px;
    top: 10px;
  }

  .text-center_weight {
    font-size: 12px;
    position: absolute;
    padding-left: 50px;
    color: #999;
    top: 30px;
  }

  .text-right {
    text-align: center;
  }

  .text-right span {
    margin: 0 0 3px 0;
    font-size: 10px;
    color: #666;
    display: inherit;
  }

  .label-v {
    width: 24px;
    height: 24px;
    vertical-align: text-bottom;
    vertical-align: middle;
    border-radius: 100%;
    background: #f0f0f0;
  }

  .line-icon {
    position: absolute;
    left: 16px;
    width: 16px;
    height: 45px;
  }

  .pull-left {
    text-align: left;
    margin-left: 24px;
  }

  .pull-left b {
    font-size: 14px;
    color: #000;
    display: block;
  }

  .pull-left span {
    font-size: 12px;
    color: #666;
    display: block;
  }

  .text-orange {
    margin: 0;
    color: #ff6c00;
    font-weight: normal !important;
    font-size: 13px;
    text-align: center;
  }

  .status-bg {
    background: url('../../assets/img/route-bg.png') no-repeat top center;
    background-size: 95px 4px;
    margin-top: 6px;
    padding-top: 10px;
  }

  .pull-right {
    text-align: right;
  }

  .pull-right b {
    font-size: 14px;
    color: #000;
    display: block;
  }

  .text-right span {
    margin: 0 0 3px 0;
    font-size: 10px;
    color: #666;
    display: inherit;
  }
</style>
